package com.weishu.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import com.weishu.domain.TCwPayOrderDetail;
import com.weishu.mapper.TCwPayOrderDetailMapper;
import com.weishu.service.ITCwPayOrderDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 收付款支付订单及业务关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-05-06
 */
@Service
public class TCwPayOrderDetailServiceImpl implements ITCwPayOrderDetailService
{
    @Autowired
    private TCwPayOrderDetailMapper tCwPayOrderDetailMapper;

    /**
     * 查询收付款支付订单及业务关联
     * 
     * @param id 收付款支付订单及业务关联主键
     * @return 收付款支付订单及业务关联
     */
    @Override
    public TCwPayOrderDetail selectTCwPayOrderDetailById(Long id)
    {
        return tCwPayOrderDetailMapper.selectTCwPayOrderDetailById(id);
    }

    /**
     * 查询收付款支付订单及业务关联列表
     * 
     * @param tCwPayOrderDetail 收付款支付订单及业务关联
     * @return 收付款支付订单及业务关联
     */
    @Override
    public List<TCwPayOrderDetail> selectTCwPayOrderDetailList(TCwPayOrderDetail tCwPayOrderDetail)
    {
        return tCwPayOrderDetailMapper.selectTCwPayOrderDetailList(tCwPayOrderDetail);
    }

    /**
     * 新增收付款支付订单及业务关联
     * 
     * @param tCwPayOrderDetail 收付款支付订单及业务关联
     * @return 结果
     */
    @Override
    public int insertTCwPayOrderDetail(TCwPayOrderDetail tCwPayOrderDetail)
    {
        tCwPayOrderDetail.setCreateTime(DateUtils.getNowDate());
        return tCwPayOrderDetailMapper.insertTCwPayOrderDetail(tCwPayOrderDetail);
    }

    /**
     * 修改收付款支付订单及业务关联
     * 
     * @param tCwPayOrderDetail 收付款支付订单及业务关联
     * @return 结果
     */
    @Override
    public int updateTCwPayOrderDetail(TCwPayOrderDetail tCwPayOrderDetail)
    {
        tCwPayOrderDetail.setUpdateTime(DateUtils.getNowDate());
        return tCwPayOrderDetailMapper.updateTCwPayOrderDetail(tCwPayOrderDetail);
    }

    /**
     * 批量删除收付款支付订单及业务关联
     * 
     * @param ids 需要删除的收付款支付订单及业务关联主键
     * @return 结果
     */
    @Override
    public int deleteTCwPayOrderDetailByIds(Long[] ids)
    {
        return tCwPayOrderDetailMapper.deleteTCwPayOrderDetailByIds(ids);
    }

    /**
     * 删除收付款支付订单及业务关联信息
     * 
     * @param id 收付款支付订单及业务关联主键
     * @return 结果
     */
    @Override
    public int deleteTCwPayOrderDetailById(Long id)
    {
        return tCwPayOrderDetailMapper.deleteTCwPayOrderDetailById(id);
    }
}
